package org.ushio.nchu_22201406.service.impl;

import org.ushio.common_module.entity.BusinessInformation;
import org.ushio.nchu_22201406.dao.BusinessInformationMapper;
import org.ushio.nchu_22201406.service.BusinessInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BusinessInformationServiceImpl implements BusinessInformationService {

    private final BusinessInformationMapper businessInformationMapper;

    @Autowired
    public BusinessInformationServiceImpl(BusinessInformationMapper businessInformationMapper) {
        this.businessInformationMapper = businessInformationMapper;
    }

    @Override
    public BusinessInformation findBusinessInformationByPhoneNumber(String phoneNumber) {
        return businessInformationMapper.findBusinessInformationByPhoneNumber(phoneNumber);
    }
    @Override
    public List<BusinessInformation> getAllBusinessInformation() {
        return businessInformationMapper.getAllBusinessInformation();
    }

    @Override
    public BusinessInformation getBusinessInformationByPhoneNumber(String phoneNumber) {
        return businessInformationMapper.getBusinessInformationByPhoneNumber(phoneNumber);
    }

    @Override
    public void updatePackageID(String phoneNumber) {
        businessInformationMapper.updatePackageID(phoneNumber);
    }
}


